# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  require 'yaml'

  before_filter :set_extra_db_connection

  def set_extra_db_connection
   extra_coord = YAML.load(File.open(File.join(RAILS_ROOT,"config/database.yml"),"r"))["extradb_"+ ENV['RAILS_ENV']]
   Acbbankrec.establish_connection(extra_coord)
   Agltransact.establish_connection(extra_coord)
  end

  # Pick a unique cookie name to distinguish our session data from others'
  session :session_key => '_bifbotkasql_session_id'
end
